﻿using Windows.UI.Xaml;
using Windows.UI.Xaml.Data;

namespace MetroApp.Helper
{
    public class ThicknessConverter : IValueConverter
    {
        public object Convert(object value, System.Type targetType, object parameter, string language)
        {
            string margin = (string)value;
            string[] strArr = margin.Split(',');
            return new Thickness(System.Convert.ToDouble(strArr[0]), System.Convert.ToDouble(strArr[1]), System.Convert.ToDouble(strArr[2]), System.Convert.ToDouble(strArr[3]));
        }

        public object ConvertBack(object value, System.Type targetType, object parameter, string language)
        {
            throw new System.NotImplementedException();
        }

    }
}
